﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.SharePoint.Administration;
using System.Globalization;

namespace FindFeatureFromId
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Find_Click(object sender, EventArgs e)
        {
            
            SPFarm oFarm = SPFarm.Local;
            var cInfo = new CultureInfo(1033);
            foreach (var oFeatureDev in oFarm.FeatureDefinitions)
            {
                if (oFeatureDev.Id.ToString().ToUpper().Contains(TextBoxFeatureId.Text.ToUpper()))
                listBoxFeatureNames.Items.Add(oFeatureDev.GetTitle(cInfo));
                
            }
        }
    }
}
